#!/usr/bin/python
import sys
import os

i=0
while(i<21):
    print "Test %02d" % i
    os.system("./uvicfmt.py ./tests/in%02d.txt | diff - ./tests/out%02d.txt" %(i, i))
    i = 1 + i
"""usr/bin/python
import subprocess
test_dir = "/home/zastre/seng265/a1/tests/"
dif_pipe = ["|","diff","-"]
test_in_list = []
test_out_list = []

for i in range(1,9):
     test_in_list.append(test_dir + "in0" + str(i) + ".txt")
     test_out_list.append(test_dir + "out0" + str(i) + ".txt")
gcc_list = ["gcc", "uvicfmt.c", "-Wall", "-o","uvicfmt"]
subprocess.call(gcc_list)

for i,j in zip(test_in_list,test_out_list):
     print(['./uvicfmt',i,"|","diff","-",j])
     subprocess.call(['./uvicfmt',i,"|","diff",j,"-"])
#./uvicfmt /home/zastre/seng265/a1/tests/in01.txt | diff - /home/zastre/seng265/a1/tests/out01.txt"""

